cmake_minimum_required(VERSION 3.0)

project(dosgame)

set(CMAKE_CXX_STANDARD 11)

if (CMAKE_VERSION VERSION_LESS "3.2")
    if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
    endif()
endif()

set(PROJECT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/src)
include_directories("${PROJECT_SOURCE_DIR}")

set(CMAKE_AUTOMOC ON)
set(CMAKE AUTOUIC ON)
set(CMAKE_AUTOUIC ON)
set(AUTOUIC ON)

find_package(Qt5Widgets REQUIRED)
find_package(Qt5Multimedia REQUIRED)

file(GLOB source_files "src/*.cpp" "src/qt/*.cpp")
file(GLOB header_files "src/*.h")

set(CMAKE_INCLUDED_CURRENT_DIR ON)

include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src)

add_executable(dosgame ${source_files} ${header_files})

qt5_use_modules(dosgame Widgets Multimedia)


target_link_libraries(dosgame ${QT_LIBRARIES})

